package sjms.construction.adapter.classes;

/**
 * @ClassName:
 * @Description:根据文件类型自动选择播放方式，使用已经存在的MP4播放器
 * @Author fcb
 * @Date 2020/5/27 15:21
 */
public class AutoPlayerAdapter extends Mp4Player implements Player {

    @Override
    public void autoPlay(String filename) {
        if(filename.contains("mp4")){
            super.play(filename);
        }else if(filename.contains("mp3")){
            System.out.println("mp3 play");
        }
    }
}
